<div id="errMsg" class="error">
	#{error 'errMsg'/}
</div>
<table class="common-table">
	<thead>
		<tr>
			<th><input id="selectAll" type="checkbox"></th>
			<th>订单号</th>
			<th>发货方式</th>
			<th>总重量</th>
			<th>总运价</th>
			<th>收货人</th>
			<th>电话号码</th>
			<th>收货地址</th>
			<th>邮编</th>
			<th>指定到货时间</th>
			<th>指定物流公司</th>
			<th>其他要求</th>
			<th width="40px">操作</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		#{if orders}
			#{list items:orders, as:'order'}
			<tr>
				<th><input class="cbItem" type="checkbox" value="${order.id}"></th>
				<td>
					<a href="/admin/order/remittanceConfirm/${order.id}">
					${order.id}
					</a>
				</td>
				<td>
					#{if order.transferPrice && order.transferPrice.company}
					<font class="important_2">${order.transferPrice.company.companyName}</font>
					#{/if}
					<br>
					起步运价为 <font class="price">${order.baseFreight}</font> 元<br>
					起步重量为 <font class="price">${order.baseFreightKG}</font> 公斤<br>
					超重后每公斤收 <font class="price">${order.freightPerKG}</font> 元<br>
				</td>
				<td><font class="important_2">${order.totalWeight}</font> KG</td>
				<td><font class="important_1">${order.totalFreight}</font> 元</td>
				<td>${order.receiver}</td>
				<td>${order.phoneNo}</td>
				<td>${order.deliveryAddress}</td>
				<td>${order.zipCode}</td>
				<td>${order.arrivalTime}</td>
				<td>${order.orderTransportCompany}</td>
				<td>${order.remark}</td>
				<td>
					<a href="/admin/order/sending/${order.id}" class="editer">
					[详细]
					</a>
					<br>
					<br>
					<a href="javascript:updateOrderSended(${order.id})" class="editer">
					[确认]
					</a>
				</td>
				<td>
					<a href="javascript:deleteItem(${order.id})" methods="DELETE" title="删除">
						<img class="minImg" src="@{'public/images/delete.gif'}">
					</a>
				</td>
			</tr>
			#{/list}
		#{/if}
		#{else}
		<tr>
			<td colspan="14">没找到结果。</td>
		</tr>
		#{/else}
	</tbody>
</table>
<div id="pager" style="font-size:1.3em;"></div>
<script language="javascript">
//初始化翻页控件。
function initialPager() {
	$("#pager").pager(
		{
			pagenumber: ${queryBean.currentPage}, 
			pagecount: ${queryBean.totalPage}, 
			totalcount: ${queryBean.totalQuantity},
			buttonClickCallback: PageClick
		}
	);
}
//翻页功能。
function PageClick(pageclickednumber) {
	$("#currentPage").val(pageclickednumber);
	reloadTable();
}
</script>